package cn.cangli.controller;

import cn.cangli.pojo.Job;
import cn.cangli.pojo.Result;
import cn.cangli.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/jobs")
@RestController
public class JobController {
    @Autowired
    private JobService jobService;
    @GetMapping
    public Result getJob() {
        List<Job> jobList = jobService.getJobList();
        return Result.success(jobList);
    }
}
